$(document).ready(function () {

	//get all offer number
	//get offer number
    $('.onum').each(function () {
        var dataUrl = 'https://www.affplus.com/getoffernum';
        $.getJSON(dataUrl, function (data) {
            $('.onum').append(data.number);
        });
    });

    //get offer number
    $('.offernum').each(function () {
        var dataId = $(this).attr('data-id');
        var dataUrl = 'https://www.affplus.com/getoffernum/' + dataId;
        $.getJSON(dataUrl, function (data) {
            $('.offernum').append(data.number);
            $('.offernum').attr('href', data.url);
        });
    });

});
